type Pop<T> = T extends [...infer K, infer R] ? K : T;

type P = Pop<[1, 2, 9]>;
